import time

import rust_http


def main():
    start = time.time()

    text, status = rust_http.post_with_json("http://httpbin.org/anything", {"a": "b", "b": "c"})
    end_time = time.time() - start

    if status != 200:
        raise Exception("error")

    print(end_time * 1000)

    print(text, status)


if __name__ == '__main__':
    main()
